

#include <stdlib.h>

#include <matrix.h>
#include <sudoku.h>

sudoku *test;

int main(int argc, char **argv){

  printf("Using this sudoku for testing purposes: test_sudoku.sdk\n");
  test = sdk_read_sudoku("test_sudoku.sdk");
  if (test == NULL){
    printf("Error reading test_sudoku.sdk\n");
    exit(1);
  }
  sdk_print_sudoku(stdout, test);

  printf("Printing the submatrices:\n");

  vm_matrix *sub_mtx_0_0 = sdk_sub_matrix(test, SDK_MTX_ROW_1, SDK_MTX_COL_1);
  vm_matrix *sub_mtx_1_1 = sdk_sub_matrix(test, SDK_MTX_ROW_2, SDK_MTX_COL_2);
  vm_matrix *sub_mtx_2_2 = sdk_sub_matrix(test, SDK_MTX_ROW_3, SDK_MTX_COL_3);
  
  //vm_print_matrix(sub_mtx_0_0, " > ");
  //vm_print_matrix(sub_mtx_1_1, " > ");
  //vm_print_matrix(sub_mtx_2_2, " > ");

  sdk_enclosing_matrix(test, 1, 1);
  sdk_enclosing_matrix(test, 4, 5);
  sdk_enclosing_matrix(test, 6, 3);
  sdk_enclosing_matrix(test, 8, 8);

  printf("Testing elimination fuctions:\n");
  printf("_sdk_elim_by_list:\n");
  _sdk_force_to_num(test, 3, 6);

}
